LassoScript Utility
Basics Browse Detail

[Email_SMTP->Command]

Tag Link [Email_SMTP->Command] Category Email
Type Member Source Available Yes
Support Preferred Version 8.0
Change Unchanged Data Source Any
Output Type Boolean or String Security Tag
Implementation LDML Sets Lasso 8.5, Lasso 8.0

Description

[Email_SMTP->Command] is a low-level tag that allows commands to be sent directly to an SMTP server. It is not usually necessary to call this tag since [SMTP->Open] handles authorization and [SMTP->Send] handles sending messages to the remote server.

The tag takes three parameters: -Send is the command to send to the remote server. -Expect is the expected return code (e.g. 250). If -Read is specified then the result of the command is returned by the tag, otherwise True or False is returned depending on whether the expected return code was found.

Syntax

[Var: 'SMTP' = (Email_SMTP)]
[$SMTP->(Open: -Host='smtp.example.com', -Username='JohnDoe', -Password='Example')]
[$SMTP->(Command: -send = 'RSET\r\n', -expect = 250)]
[$SMTP->Close]

Parameters

Optional Parameters
-Send The command to send to the SMTP server.
-Expect The expected return code from the server (e.g. 250)
-Read If specified, the tag will return what was sent back from the server.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.